<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%-- 
    JSP Name : list.jsp
    Description : 진행 이벤트 리스트를 보여준다.
    author jkKim
    since 2012. 5. 10.
    version 1.0
    Modification Information
       since          author              description
    ===========    =============    ===========================
    2012. 5. 10.     jkKim     최초 생성
--%>
<%@ include file="/WEB-INF/jsp/com/include/declare.jspf" %>
<%@ include file="/WEB-INF/jsp/com/include/doctype.jspf" %>
<script>
function eventSubList(pageIndex){
    $.ajax({
        type: "POST",
        dataType : "text",
        url: "<c:url value='/evnt/selectEvntMnPaging2.do'/>",
        data: {
            'pageIndex' : pageIndex
        },
        success: function(data){
            $("#eventSubList").html('');
            $("#eventSubList").html(data);
        }
    });
    
    
}

$(document).ready(function() {
    eventSubList(1); 
});
</script>
</head>
<body>
<%@ include file="/WEB-INF/jsp/com/include/layerpopup.jspf" %>
<div id="wrap" class="non-subnavigation">
	<%@ include file="/WEB-INF/jsp/com/include/navi_utill_sub.jspf" %>
    <%@ include file="/WEB-INF/jsp/com/include/navi_header.jspf" %>
	<hr />

	<%@ include file="/WEB-INF/jsp/com/include/sub_header_event.jspf" %>
	<hr />
 
	<div id="container">
		<div id="subtitle-area"><div class="subtitle-area-inner">
			<%@ include file="/WEB-INF/jsp/com/include/location.jspf" %>
		</div></div>
		<div id="article">
			<p class="default-desc"><img src="/kr/images/event/txt_event01_01.gif"  style="vertical-align:middle;" alt="고객님을 위한 스페셜 이벤트! 즐거운 행운과 경품을 만나보세요!" />&nbsp;(회원가입 및 로그인 후 응모하실 수 있습니다.)</p>
			<div class="event-spot-wraper">
				<div class="event-spot-wrap">
                    <c:forEach var="result" items="${resultList}" varStatus="status" end ="5">
        					<div class="spot-cont">
        						<a href="/kr/evnt/selectEvntMnDetail.do?evntMnSn=${result.evntMnSn}"><img src="<c:url value='${result.mnImgPath}'/>" alt="${result.evntTitl}" /></a>
        					</div>
                    </c:forEach>					
				</div>
			</div>
			<div class="event-list subsection">
                <c:forEach var="result" items="${resultList}" varStatus="status">
                   <div class="section">
                        <a href="/kr/evnt/selectEvntMnDetail.do?evntMnSn=${result.evntMnSn}"><img src="<c:url value='${result.thumnImgPath}'/>" alt="${result.evntTitl}" class="thumb" /></a>
                        <ul class="information">
                            <li>
                                <strong class="title"><img src="/kr/images/event/txt_event01_02.gif" alt="제목" /></strong>
                                <p class="subject"><a href="/kr/evnt/selectEvntMnDetail.do?evntMnSn=${result.evntMnSn}">${result.evntTitl}</a></p>
                            </li>
                            <li>
                                <strong class="title"><img src="/kr/images/event/txt_event01_03.gif" alt="내용" /></strong>
                                <p>${result.evntSbc}</p>
                            </li>
                            <li>
                                <strong class="title"><img src="/kr/images/event/txt_event01_04.gif" alt="기간" /></strong>
                                <p>${fn:substring(result.strtDt, 0, 4)}-${fn:substring(result.strtDt, 4, 6)}-${fn:substring(result.strtDt, 6, 8)} ~ ${fn:substring(result.fnhDt, 0, 4)}-${fn:substring(result.fnhDt, 4, 6)}-${fn:substring(result.fnhDt, 6, 8)}
                                </p>
                            </li>
                            <li>
                                <strong class="title"><img src="/kr/images/event/txt_event01_05.gif" alt="대상" /></strong>
                                <p>
                                <c:if test="${result.evntSubj == 'E1'}">
                                <able:hmcCodeTag type="codeNm" gCd="EVNTUBJ" comCd="E1"/>
                                </c:if>
                                <c:if test="${result.evntSubj == 'E2'}">
                                <able:hmcCodeTag type="codeNm" gCd="EVNTUBJ" comCd="E2"/>
                                </c:if>
                                </p>  
                            </li>
                        </ul>
                    </div> 
                </c:forEach>
			</div>
			<h5 class="subsection"><img src="/kr/images/title/h5_event01_01.gif" alt="당첨자발표" /></h5>
			<div id="eventSubList">
            </div>
		</div>
	</div>
	<hr />
	<%@ include file="/WEB-INF/jsp/com/include/footer.jspf" %>